package com.wemew.common.exceptionhandler;

import com.wemew.common.enums.error.Error;

/**
   * 作者 MM
   * 时间 2020/12/24 17:07
   * 注释 业务异常
   */
public class BusinessException extends RuntimeException{
	
	private static final long serialVersionUID = -1629974785937212496L;

    private Integer code;

    public BusinessException(Error errorEnum){
        super(errorEnum.getMsg());
        this.code=errorEnum.getCode();
    }
    public BusinessException(String msg, Integer code){
        super(msg);
        this.code=code;
    }
    public Integer getCode() {
        return code;
    }

}
